Instruct how to write a case sensitive regex pattern. (#741)

Akinori MUSHA 9 jaren geleden
bovenliggende
commit
1093275068
1 gewijzigde bestanden met toevoegingen van 2 en 2 verwijderingen
  1. 2 2
      app/models/agents/trigger_agent.rb

+ 2 - 2
app/models/agents/trigger_agent.rb

@@ -9,9 +9,9 @@ module Agents
9 9
 
10 10
       The `rules` array contains hashes of `path`, `value`, and `type`.  The `path` value is a dotted path through a hash in [JSONPaths](http://goessner.net/articles/JsonPath/) syntax.
11 11
 
12
-      The `type` can be one of #{VALID_COMPARISON_TYPES.map { |t| "`#{t}`" }.to_sentence} and compares with the `value`.
12
+      The `type` can be one of #{VALID_COMPARISON_TYPES.map { |t| "`#{t}`" }.to_sentence} and compares with the `value`.  Note that regex patterns are matched case insensitively.  If you want case sensitive matching, prefix your pattern with `(?-i)`.
13 13
 
14
-      The `value` can be a single value or an array of values. In the case of an array, if one or more values match then the rule matches. 
14
+      The `value` can be a single value or an array of values. In the case of an array, if one or more values match then the rule matches.
15 15
 
16 16
       All rules must match for the Agent to match.  The resulting Event will have a payload message of `message`.  You can use liquid templating in the `message, have a look at the [Wiki](https://github.com/cantino/huginn/wiki/Formatting-Events-using-Liquid) for details.
17 17